    #include "task.h"
    data_struct* task::queue_handle;
    oal_uint32 task::epollfd;//在静态成员函数中可以直接访问静态成员变量
    oal_uint32 task::recv_epollfd;
    oal_uint32 task::listen_fd;//监听拉流
    oal_uint32 task::push_listen_fd;//监听推流
    struct epoll_event  task::events[MAX_FLV_EVENT_NUMBER];
    struct epoll_event  task::push_events[MAX_PUSH_EVENT_NUMBER];
    oal_int32  task::pipe_fd[2];
task::task()
{
        int ret = pipe(pipe_fd);
        if(ret < 0)
        {
            printf("pipe wrong!!\n");
        }
        if(pthread_create(&listen_task,NULL, listen_func,this) != 0)
        {
            printf("create listen task failed\n");
        }
        // if (pthread_detach(listen_task)!=0)//pthread_detach(thread_head[i])表示被创建的线程在结束后自动释放所有资源，不需要主线程去调join回收其资源
		// {
		// 	printf("datach pthread failed\n");
		// }
        if(pthread_create(&recv_stream_task,NULL, recv_stream_func,this) != 0)
        {
            printf("create recv_stream_task failed\n");
        }
        // if (pthread_detach(recv_stream_task)!=0)//pthread_detach(thread_head[i])表示被创建的线程在结束后自动释放所有资源，不需要主线程去调join回收其资源
		// {
		// 	printf("datach pthread failed\n");
		// }
        for(oal_uint8 i = 0; i < PUSH_TASK_NUM ; i++)
        {
            if(pthread_create(push_stream_task + i,NULL, push_stream_func,this) != 0)
            {
                printf("create push_stream_task failed\n");
            }
            // if (pthread_detach(push_stream_task[i])!=0)//pthread_detach(thread_head[i])表示被创建的线程在结束后自动释放所有资源，不需要主线程去调join回收其资源
		    // {
			//     printf("datach pthread failed\n");
		    // }
        }
       
}